<?php
/**
 * Created by PhpStorm.
 * User: Jan-Home
 * Date: 2018/4/5 0005
 * Time: 18:03
 */

namespace Gitee;


use Ke\Uri;

abstract class GiteeCoreApi
{
	
	protected $uri;
	
	protected $baseUrl = 'http://gitee.com/api/';
	
	protected $version = 'v5';
	
	protected $appApi;
	
	public function __construct(GiteeAppApi $appApi)
	{
		$this->appApi = $appApi;
	}
	
	public function uri($path = '', $query = null)
	{
		if (!isset($this->uri)) {
			$this->uri = new Uri("{$this->baseUrl}/{$this->version}/");
		}
		return $this->uri->newUri($path, $query);
	}
	
	
}